home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-13
/
me_cd22.zip
/
MUTT2.ZIP
/
NOMUNGE.MUT
< prev
next >
Wrap
Text File
|
1992-04-27
|
1KB
|
50 lines
;; nomunge.mut :
;; Make the file in the current buffer unmungeable - ie allow
;; no changes to buffer contents.
;; Note that this method is full of holes but works OK for people not
;; going out of their way to munge the buffer.
;; C Durland Public Domain
(include me2.h)
(defun
self-nomunge { (msg "buffer unmungeable!") }
nomungeCR { (forward-line 1) }
buffer-nomunge
{
(small-int i)
(for (i 0x20) (< i 0x7F) (+= i 1)
(bind-local-key "self-nomunge" (convert-to CHARACTER i)))
(bind-local-key "self-nomunge" "C-d")
(bind-local-key "self-nomunge" "C-H")
(bind-local-key "self-nomunge" "C-d")
(bind-local-key "self-nomunge" "C-xC-s")
(bind-local-key "self-nomunge" "C-q")
(bind-local-key "self-nomunge" "C-k")
(bind-local-key "self-nomunge" "C-o")
(bind-local-key "self-nomunge" "M-Q")
(bind-local-key "self-nomunge" "C-T")
(bind-local-key "self-nomunge" "C-I")
(bind-local-key "self-nomunge" "C-Y")
(bind-local-key "self-nomunge" "M-d")
(bind-local-key "nomungeCR" "C-m")
(bind-local-key "nomungeCR" "C-j")
(file-name -1 "")
(buffer-flags -1 BFFoo)
(local-modeline-hook "nomunge-modeline")
}
nomunge-modeline
{
(concat
"!!!!!!!!!!!!!!!!!"
(buffer-name -1)
" is READ ONLY"
"!"
)
}
)